Subtyping Functional+Nonempty Record Types

نویسنده

  • Sergei G. Vorobyov
چکیده

Solving systems of subtype constraints (or subtype inequalities) is in the core of eecient type reconstruction in modern object-oriented languages with subtyping and inheritance, two problems known polynomial time equivalent. It is important to know how diierent combinations of type constructors innuence the complexity of the problem. We show the NP-hardness of the satissability problem for subtype inequalities between object types built by using simultaneously both the functional and the non-empty record type constructors, but without any atomic types and atomic subtyping. The class of constraints we address is intermediate with respect to known classes. For pure functional types with atomic subtyping of a special non-lattice (crown) form solving subtype constraints is PSPACE-complete (Tiuryn 1992, Frey 1997). On the other hand, if there are no atomic types and subtyping on them, but the largest > type is included, then both pure functional and pure record (separately) subtype constraints are polynomial time solvable (Kozen, Palsberg & Schwartzbach 1994, Palsberg 1995), which is mainly due to the lattice type structure. We show that combining the functional and nonempty record constructors yields NP-hardness without any atomic subtyping, and the same is true for just a single type constant with a nonempty record constructor.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Semantic subtyping between coinductive mutable record types with unions and intersections

Semantic subtyping between coinductive record types supports accurate type analysis of object-oriented languages, by introducing Boolean type constructors and modeling cyclic objects. In previous work, a sound and complete algorithm for semantic subtyping has been proposed, but only for coinductive immutable record types with unions. In this work we address the issue of extending the previous r...

متن کامل

Constructor Subtyping

Constructor subtyping is a form of subtyping in which an induc tive type is viewed as a subtype of another inductive type if has more constructors than As suggested in its potential uses include proof assistants and functional programming languages In this paper we introduce and study the properties of a simply typed calculus with record types and datatypes and which supports record sub typing ...

متن کامل

A Type System for Record Concatenation and Subtyping

We deene an extension of a second-order type system with records, subtyping and record concatenation. This system can model the most important concepts of object-oriented languages. The novelty in our approach is that concatenation is only permitted if the types on common elds agree. We give examples of how object-oriented concepts can be modeled and show how the system can be translated to a t...

متن کامل

System F with Width-Subtyping and Record Updating

It is a well-known problem that F { the polymorphic lambda calculus F extended with subtyping { does not provide so-called polymor-phic updates, and that the standard PER model for F does not provide interpretations for these operations. The polymorphic updates are interesting because they play an important role in some type-theoretic models of object-oriented languages. We present an extension...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998